
Ext.define('MobileTest.view.NavTabView', {
    extend: 'Ext.tab.Panel',
    alias: 'widget.navtab',    
    activeItem: 0,
    //margins: '5 5 5 5',    
    //cls: 'preview',    
    height:30,
    minTabWidth:100,
    resizeTabs:true,
    border:false,                    
    initComponent: function() {
         
         var me=this;
         /**       
        this.items = [
          	{
            	title: '首页',
            	key:'home_tab',
            	html : 'A simple tab'
            	
        	},
        	{
            	title: '实时测试监控',
            	key:'test_tab',
            	html : 'Another one'
        	},
        	{
            	title: '测试分析报告',
            	key:'report_tab',
            	html : 'Another one'
        	},
        	{
            	title: '终端管理',
            	key:'mobile_tab',
            	html : 'Another one'
        	},
        	{
            	title: '脚本管理',
            	key:'script_tab',
            	html : 'Another one'
        	},
        	{
            	title: '系统管理',
            	key:'system_tab',
            	html : 'Another one'
        	}
		];
		 **/
		 var dicMenu=Ext.create('MobileTest.store.DictStore');
		 dicMenu.load({
		 	params:{mtype:1,ref:0},
		 	callback: function(records, operation, success) {
        		        		
        		for(var index=0;index<records.length;index++){
        			        			
        			 me.add({
            				title: records[index].data.desc,
            				key:records[index].data.id,
            				value : records[index].data.value,
            				html :''
        				});      			
        		}       		
				me.setActiveTab(0);
    		}
    	});       
		        
        this.callParent(arguments);
    }
});
